<template>
	<view class="content">
		<view v-for="item,index in areaList" :key="index" @click="handleJumpClick(item.id)" class='btn1'>
			{{item.areaName}}
		</view>
	</view>
</template>
<script setup>
	import {
		onMounted,
		ref
	} from "vue";
	const areaList = ref([])
	onMounted(() => {
		uni.request({
			url: import.meta.env.VITE_APP_BASE_API + '/area/ua/listAreas',
			method: 'GET',
			success(res) {
				areaList.value = res.data.data
			}
		})
	})
	const handleJumpClick = (e) => {
		uni.navigateTo({
			url: "/pages/map/map?areaId=" + e
		})
	}
</script>
<style lang="less">
	.btn1 {
		width: 40%;
		height: 100rpx;
		border: #c1c1c1 1px solid;
		font-size: 35rpx;
		border-radius: 30rpx;
		box-shadow: 5px 5px 3px 1px rgba(241, 200, 176, 0.3);
		display: flex;
		justify-content: center;
		align-items: center;
		margin: 5rpx;
	}
</style>